<?php

$query_array=array("name"=>array("name"=>__("Hardware"),
                                 "sql"=>"SELECT `system_name` FROM `system` WHERE `system_uuid` = '" . $_GET["pc"] . "'",
                                ),
                   "image"=>"images/os_l.png",
                   "views"=>array(
                                   "chassis"=>array(
                                                    "headline"=>__("Chassis"),
                                                    "sql"=>"SELECT system_vendor, system_model, system_id_number, system_system_type FROM system WHERE system_uuid = '" . $_GET["pc"] . "' AND  system_timestamp = '".$GLOBAL["system_timestamp"]."' ",
                                                    "image"=>"images/o_storage-misc.png",
                                                    "fields"=>array("10"=>array("name"=>"system_vendor", "head"=>__("Manufacturer"),),
                                                                    "20"=>array("name"=>"system_model", "head"=>__("Model #"),),
                                                                    "30"=>array("name"=>"system_id_number", "head"=>__("Serial #"),),
                                                                    "40"=>array("name"=>"system_system_type", "head"=>__("Chassis Type"),),
                                                                   ),
                                                    ),
                                   "motherboard"=>array(
                                                    "headline"=>__("Motherboard"),
                                                    "sql"=>"SELECT * FROM motherboard WHERE motherboard_uuid = '" . $_GET["pc"] . "' AND motherboard_timestamp = '".$GLOBAL["system_timestamp"]."' ",
                                                    "image"=>"images/memory_l.png",
                                                    "fields"=>array("10"=>array("name"=>"motherboard_manufacturer", "head"=>__("Manufacturer"),),
                                                                    "20"=>array("name"=>"motherboard_product", "head"=>__("Product"),),
                                                                    "30"=>array("name"=>"motherboard_cpu_sockets", "head"=>__("CPU Sockets"),),
                                                                    "40"=>array("name"=>"motherboard_memory_slots", "head"=>__("Memory Slots"),),
                                                                   ),
                                                    ),
                                   "onboard_device"=>array(
                                                    "headline"=>__("Onboard Devices"),
                                                    "sql"=>"SELECT * FROM onboard_device WHERE onboard_uuid = '" . $_GET["pc"] . "' AND onboard_timestamp = '".$GLOBAL["system_timestamp"]."' ",
                                                    "image"=>"images/memory_l.png",
                                                    "table_layout"=>"horizontal",
                                                    "fields"=>array("10"=>array("name"=>"onboard_description", "head"=>__("Description"),),
                                                                    "20"=>array("name"=>"onboard_type", "head"=>__("Type"),),
                                                                   ),
                                                    ),
                                  "hard_drive"=>array(
                                                    "headline"=>__("Fixed Disks"),
                                                    "sql"=>"SELECT hard_drive_index, hard_drive_manufacturer, hard_drive_interface_type, hard_drive_model, 
                                                                   hard_drive_partitions, hard_drive_size, hard_drive_scsi_bus, hard_drive_scsi_logical_unit, 
                                                                   hard_drive_scsi_port, hard_drive_status
                                                            FROM hard_drive, system
                                                            WHERE hard_drive_uuid=system_uuid AND hard_drive_uuid = '" . $_GET["pc"] . "' AND hard_drive_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY hard_drive_index",
                                                    "image"=>"images/harddisk_l.png",
                                                    "fields"=>array("10"=>array("name"=>"hard_drive_index", "head"=>__("Index"),),
                                                                    "20"=>array("name"=>"hard_drive_manufacturer", "head"=>__("Manufacturer"),),
                                                                    "30"=>array("name"=>"hard_drive_interface_type", "head"=>__("Type"),),
                                                                    "40"=>array("name"=>"hard_drive_model", "head"=>__("Model"),),
                                                                    "50"=>array("name"=>"hard_drive_partitions", "head"=>__("Partitions"),),
                                                                    "60"=>array("name"=>"hard_drive_size", "head"=>__("Size"),),
                                                                    "70"=>array("name"=>"hard_drive_scsi_bus", "head"=>__("SCSI Bus"),),
                                                                    "80"=>array("name"=>"hard_drive_scsi_logical_unit", "head"=>__("SCSI Logical Unit"),),
                                                                    "90"=>array("name"=>"hard_drive_scsi_port", "head"=>__("SCSI Port"),),
                                                                    "100"=>array("name"=>"hard_drive_status", "head"=>__("Status"),),
                                                                   ),
                                                    ),
                                   "partition"=>array(
                                                    "headline"=>__("Partitions"),
                                                    "sql"=>"SELECT * FROM partition WHERE (partition_uuid = '" . $_GET["pc"] . "' AND partition_timestamp = '".$GLOBAL["system_timestamp"]."') ORDER BY partition_device_id, partition_caption ",
                                                    "image"=>"images/partition_l.png",
                                                    "fields"=>array("10"=>array("name"=>"partition_device_id", "head"=>__("Index"),),
                                                                    "20"=>array("name"=>"partition_caption", "head"=>__("Drive Letter"),),
                                                                    "30"=>array("name"=>"partition_volume_name", "head"=>__("Description"),),
                                                                    "40"=>array("name"=>"partition_boot_partition", "head"=>__("Boot Partition"),),
                                                                    "50"=>array("name"=>"partition_bootable", "head"=>__("Bootable"),),
                                                                    "60"=>array("name"=>"partition_size", "head"=>__("Size"),),
                                                                    "70"=>array("name"=>"partition_file_system", "head"=>__("Filesystem"),),
                                                                    "80"=>array("name"=>"partition_free_space", "head"=>__("Free Space"),),
                                                                   ),
                                                    ),
                                   "scsi_controller"=>array(
                                                    "headline"=>__("SCSI Controller"),
                                                    "sql"=>"SELECT * FROM scsi_controller, system  WHERE scsi_controller_uuid=system_uuid AND scsi_controller_uuid = '" . $_GET["pc"] . "' AND scsi_controller_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY scsi_controller_device_id",
                                                    "image"=>"images/scsi_l.png",
                                                    "fields"=>array("10"=>array("name"=>"scsi_controller_caption", "head"=>__("Name"),),
                                                                    "20"=>array("name"=>"scsi_controller_manufacturer", "head"=>__("Manufacturer"),),
                                                                   ),
                                                    ),
                                   "optical_drive"=>array(
                                                    "headline"=>__("Optical Drive"),
                                                    "sql"=>"SELECT * FROM optical_drive WHERE optical_drive_uuid = '" . $_GET["pc"] . "' AND optical_drive_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY optical_drive_drive",
                                                    "image"=>"images/optical_l.png",
                                                    "fields"=>array("10"=>array("name"=>"optical_drive_drive", "head"=>__("Drive Letter"),),
                                                                    "20"=>array("name"=>"optical_drive_caption", "head"=>__("Manufacturer"),),
                                                                   ),
                                                    ),
                                   "floppy"=>array(
                                                    "headline"=>__("Floppy Drive"),
                                                    "sql"=>"SELECT * FROM floppy WHERE floppy_uuid = '" . $_GET["pc"] . "' AND floppy_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/floppy_l.png",
                                                    "fields"=>array("10"=>array("name"=>"floppy_caption", "head"=>__("Name"),),
                                                                    "20"=>array("name"=>"floppy_description", "head"=>__("Description"),),
                                                                    "30"=>array("name"=>"floppy_manufacturer", "head"=>__("Manufacturer"),),
                                                                   ),
                                                    ),
                                   "tape_drive"=>array(
                                                    "headline"=>__("Tape Drive"),
                                                    "sql"=>"SELECT * FROM tape_drive WHERE tape_drive_uuid = '" . $_GET["pc"] . "' AND tape_drive_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY tape_drive_id",
                                                    "image"=>"images/tape_l.png",
                                                    "fields"=>array("10"=>array("name"=>"tape_drive_manufacturer", "head"=>__("Manufacturer"),),
                                                                    "20"=>array("name"=>"tape_drive_caption", "head"=>__("Name"),),
                                                                    "30"=>array("name"=>"tape_drive_description", "head"=>__("Description"),),
                                                                   ),
                                                    ),
                                   "processor"=>array(
                                                    "headline"=>__("Processor"),
                                                    "sql"=>"SELECT * FROM processor WHERE processor_uuid = '" . $_GET["pc"] . "' AND processor_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY processor_id",
                                                    "image"=>"images/processor_l.png",
                                                    "fields"=>array("10"=>array("name"=>"processor_device_id", "head"=>__("Index"),),
                                                                    "20"=>array("name"=>"processor_manufacturer", "head"=>__("Manufacturer"),),
                                                                    "30"=>array("name"=>"processor_caption", "head"=>__("Type"),),
                                                                    "40"=>array("name"=>"processor_name", "head"=>__("Model"),),
                                                                    "50"=>array("name"=>"processor_socket_designation", "head"=>__("Socket Type"),),
                                                                    "60"=>array("name"=>"processor_max_clock_speed", "head"=>__("Max Speed MHz"),),
                                                                    "70"=>array("name"=>"processor_current_clock_speed", "head"=>__("Current Speed MHz"),),
                                                                    "80"=>array("name"=>"processor_ext_clock", "head"=>__("External Clock"),),
                                                                    "90"=>array("name"=>"processor_current_voltage", "head"=>__("Current Voltage"),),
                                                                   ),
                                                    ),
                                   "bios"=>array(
                                                    "headline"=>__("Bios"),
                                                    "sql"=>"SELECT * FROM bios WHERE bios_uuid = '" . $_GET["pc"] . "' AND bios_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/bios_l.png",
                                                    "fields"=>array("10"=>array("name"=>"bios_description", "head"=>__("Description"),),
                                                                    "20"=>array("name"=>"bios_manufacturer", "head"=>__("Manufacturer"),),
                                                                    "30"=>array("name"=>"bios_serial_number", "head"=>__("Serial"),),
                                                                    "40"=>array("name"=>"bios_version", "head"=>__("Version"),),
                                                                    "50"=>array("name"=>"bios_sm_bios_version", "head"=>__("Version"),),
                                                                    "60"=>array("name"=>"bios_asset_tag", "head"=>__("Asset Tag"),),
                                                                   ),
                                                    ),
                                   "memory"=>array(
                                                    "headline"=>__("Memory"),
                                                    "sql"=>"SELECT * FROM memory WHERE memory_uuid = '" . $_GET["pc"] . "' AND memory_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY memory_id",
                                                    "image"=>"images/memory_l.png",
                                                    "table_layout"=>"horizontal",
                                                    "fields"=>array("10"=>array("name"=>"memory_tag", "head"=>__("Slot"),),
                                                                    "20"=>array("name"=>"memory_bank", "head"=>__("Bank"),),
                                                                    "30"=>array("name"=>"memory_form_factor", "head"=>__("Form Factor"),),
                                                                    "40"=>array("name"=>"memory_type", "head"=>__("Type"),),
                                                                    "50"=>array("name"=>"memory_detail", "head"=>__("Type Detail"),),
                                                                    "60"=>array("name"=>"memory_speed", "head"=>__("Speed"),),
                                                                    "70"=>array("name"=>"memory_capacity", "head"=>__("Capacity"),),
                                                                   ),
                                                    ),
                                    "network_card"=>array(
                                                    "headline"=>__("Network Card"),
                                                    "sql"=>"SELECT * FROM network_card WHERE net_uuid = '" . $_GET["pc"] . "' AND net_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY net_index ",
                                                    "image"=>"images/network_device_l.png",
                                                    "fields"=>array("10"=> array("name"=>"net_connection_id", "head"=>__("Connection ID"),),
                                                                    //"20"=> array("name"=>"net_index", "head"=>__("Index"),),
                                                                    "30"=> array("name"=>"net_description", "head"=>__("Description"),),
                                                                    "40"=> array("name"=>"net_manufacturer", "head"=>__("Manufacturer"),),
                                                                    "50"=> array("name"=>"net_service_name", "head"=>__("Service Name"),),
                                                                    "60"=> array("name"=>"net_adapter_type", "head"=>__("Type"),),
                                                                    "70"=> array("name"=>"net_mac_address", "head"=>__("MAC Address"),),
                                                                    "80"=> array("name"=>"net_connection_status", "head"=>__("Connectivity status"),),
                                                                    "90"=> array("name"=>"net_speed", "head"=>__("Link speed"),),
                                                                    "100"=>array("name"=>"net_ip_enabled", "head"=>__("IP Enabled"),),
                                                                    "110"=>array("name"=>"net_ip_address", "head"=>__("IP address"),),
                                                                    "120"=>array("name"=>"net_ip_subnet", "head"=>__("Subnet Mask"),),
                                                                    "130"=>array("name"=>"net_ip_address_2", "head"=>__("IP address 2"),),
                                                                    "140"=>array("name"=>"net_ip_subnet_2", "head"=>__("Subnet Mask 2"),),
                                                                    "150"=>array("name"=>"net_ip_address_3", "head"=>__("IP address 3"),),
                                                                    "160"=>array("name"=>"net_ip_subnet_3", "head"=>__("Subnet Mask 3"),),
                                                                    //"170"=>array("name"=>"net_ip_metric", "head"=>__("Interface metric"),),
                                                                    "180"=>array("name"=>"net_gateway", "head"=>__("Gateway"),),
                                                                    //"190"=>array("name"=>"net_gateway_metric", "head"=>__("Gateway metric"),),
                                                                    "200"=>array("name"=>"net_gateway_2", "head"=>__("Gateway 2"),),
                                                                    //"210"=>array("name"=>"net_gateway_metric_2", "head"=>__("Gateway metric 2"),),
                                                                    "220"=>array("name"=>"net_gateway_3", "head"=>__("Gateway 3"),),
                                                                    //"230"=>array("name"=>"net_gateway_metric_3", "head"=>__("Gateway metric 3"),),
                                                                    "240"=>array("name"=>"net_dns_server", "head"=>__("Preferred DNS"),),
                                                                    "250"=>array("name"=>"net_dns_server_2", "head"=>__("Alternate DNS"),),
                                                                    "260"=>array("name"=>"net_dns_server_3", "head"=>__("Alternate DNS 2"),),
                                                                    //"270"=>array("name"=>"net_dns_domain", "head"=>__("Connection DNS Domain"),),
                                                                    //"280"=>array("name"=>"net_dns_domain_suffix", "head"=>__("Connection DNS Domain suffix"),),
                                                                    //"290"=>array("name"=>"net_dns_domain_suffix_2", "head"=>__("Connection DNS Domain suffix 2"),),
                                                                    //"300"=>array("name"=>"net_dns_domain_suffix_3", "head"=>__("Connection DNS Domain suffix 3"),),
                                                                    //"310"=>array("name"=>"net_dns_domain_reg_enabled", "head"=>__("DNS Domain reg enabled"),),
                                                                    //"320"=>array("name"=>"net_dns_domain_full_reg_enabled", "head"=>__("DNS Domain full reg enabled"),),
                                                                    "330"=>array("name"=>"net_wins_primary", "head"=>__("Primary WINS"),),
                                                                    "340"=>array("name"=>"net_wins_secondary", "head"=>__("Secondary WINS"),),
                                                                    "350"=>array("name"=>"net_wins_lmhosts_enabled", "head"=>__("LMHosts Lookup enabled"),),
                                                                    "360"=>array("name"=>"net_netbios_options", "head"=>__("Netbios over TCP/IP"),),
                                                                    "370"=>array("name"=>"net_dhcp_enabled", "head"=>__("DHCP enabled"),),
                                                                    "380"=>array("name"=>"net_dhcp_server", "head"=>__("DHCP Server"),),
                                                                    "390"=>array("name"=>"net_dhcp_lease_obtained", "head"=>__("DHCP Lease obtained"),),
                                                                    "400"=>array("name"=>"net_dhcp_lease_expires", "head"=>__("DHCP Lease expires"),),
                                                                    "410"=>array("name"=>"net_driver_provider", "head"=>__("Driver Provider"),),
                                                                    "420"=>array("name"=>"net_driver_version", "head"=>__("Driver Version"),),
                                                                    "430"=>array("name"=>"net_driver_date", "head"=>__("Driver Date"),),
                                                                   ),
                                                    ),
                                   "video"=>array(
                                                    "headline"=>__("Video Adapter"),
                                                    "sql"=>"SELECT * FROM video WHERE video_uuid = '" . $_GET["pc"] . "' AND video_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/video_l.png",
                                                    "fields"=>array("10"=>array("name"=>"video_caption", "head"=>__("Model"),),
                                                                    "20"=>array("name"=>"video_adapter_ram", "head"=>__("RAM"),),
                                                                    "30"=>array("name"=>"video_current_horizontal_res", "head"=>__("Horizontal Resolution (x)"),),
                                                                    "40"=>array("name"=>"video_current_vertical_res", "head"=>__("Vertical Resolution (y)"),),
                                                                    "50"=>array("name"=>"video_current_refresh_rate", "head"=>__("Refresh Rate"),),
                                                                    "60"=>array("name"=>"video_current_number_colours", "head"=>__("Color Depth"),),
                                                                    "70"=>array("name"=>"video_driver_version", "head"=>__("Driver Version"),),
                                                                    "80"=>array("name"=>"video_driver_date", "head"=>__("Driver Date"),),
                                                                   ),
                                                    ),

                                   "monitor"=>array(
                                                    "headline"=>__("Monitor"),
                                                    "sql"=>"SELECT * FROM monitor WHERE monitor_uuid = '" . $_GET["pc"] . "' AND monitor_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/display_l.png",


                                                    "fields"=>array("10"=>array("name"=>"monitor_model", "head"=>__("Model"), "edit"=>"n",),
                                                                    "20"=>array("name"=>"monitor_serial", "head"=>__("Serial"), "edit"=>"n",),
                                                                    "40"=>array("name"=>"","head"=>__("")),
                                                                    "50"=>array("name"=>"monitor_manufacturer", "head"=>__("Manufacturer"), "edit"=>"n",),
                                                                    "60"=>array("name"=>"monitor_manufacture_date", "head"=>__("Date of Manufacture"), "edit"=>"n",),
                                                                    "70"=>array("name"=>"monitor_date_purchased", "head"=>__("Date of Purchase"), "edit"=>"n",),
                                                                    "80"=>array("name"=>"monitor_purchase_order_number", "head"=>__("Purchase Order Number"), "edit"=>"n",),
                                                                    "90"=>array("name"=>"monitor_value", "head"=>__("Dollar Value"), "edit"=>"n",),
                                                                    "100"=>array("name"=>"monitor_description", "head"=>__("Description"), "edit"=>"n",),
                                                                   ),
                                                    ),
                                   "sound"=>array(
                                                    "headline"=>__("Soundcard"),
                                                    "sql"=>"SELECT * FROM sound WHERE sound_uuid = '" . $_GET["pc"] . "' AND sound_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/audio_l.png",
                                                    "fields"=>array("10"=>array("name"=>"sound_name", "head"=>__("Name"),),
                                                                    "20"=>array("name"=>"sound_manufacturer", "head"=>__("Manufacturer"),),
                                                                   ),
                                                    ),
                                   "keyboard"=>array(
                                                    "headline"=>__("Keyboard"),
                                                    "sql"=>"SELECT * FROM keyboard WHERE keyboard_uuid = '" . $_GET["pc"] . "' AND keyboard_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/keyboard_l.png",
                                                    "fields"=>array("10"=>array("name"=>"keyboard_caption", "head"=>__("Type"),),
                                                                    "20"=>array("name"=>"keyboard_description", "head"=>__("Description"),),
                                                                   ),
                                                    ),
                                   "mouse"=>array(
                                                    "headline"=>__("Mouse"),
                                                    "sql"=>"SELECT * FROM mouse WHERE mouse_uuid = '" . $_GET["pc"] . "' AND mouse_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/mouse_l.png",
                                                    "fields"=>array("10"=>array("name"=>"mouse_description", "head"=>__("Description"),),
                                                                    "20"=>array("name"=>"mouse_number_of_buttons", "head"=>__("Buttons"),),
                                                                    "30"=>array("name"=>"mouse_port", "head"=>__("Port"),),
                                                                   ),
                                                    ),
                                   "modem"=>array(
                                                    "headline"=>__("Modem"),
                                                    "sql"=>"SELECT * FROM modem WHERE modem_uuid = '" . $_GET["pc"] . "' AND modem_timestamp = '".$GLOBAL["system_timestamp"]."' ORDER BY modem_attached_to",
                                                    "image"=>"images/modem_l.png",
                                                    "fields"=>array("10"=>array("name"=>"modem_device_type", "head"=>__("Type"),),
                                                                    "20"=>array("name"=>"modem_description", "head"=>__("Description"),),
                                                                    "30"=>array("name"=>"modem_attached_to", "head"=>__("Port"),),
                                                                    "40"=>array("name"=>"modem_country_selected", "head"=>__("Country"),),
                                                                   ),
                                                    ),
                                   "battery"=>array(
                                                    "headline"=>__("Battery"),
                                                    "sql"=>"SELECT * FROM battery WHERE battery_uuid = '" . $_GET["pc"] . "' AND battery_timestamp = '".$GLOBAL["system_timestamp"]."'",
                                                    "image"=>"images/battery_l.png",
                                                    "fields"=>array("10"=>array("name"=>"battery_description", "head"=>__("Description"),),
                                                                    "20"=>array("name"=>"battery_device_id", "head"=>__("ID"),),
                                                                   ),
                                                    ),
                                   "printer"=>array(
                                                    "headline"=>__("Printer"),
                                                    "sql"=>"SELECT * FROM other WHERE other_type = 'printer' AND other_linked_pc = '" . $_GET["pc"] . "' AND other_timestamp = '".$GLOBAL["system_timestamp"]."' ",
                                                    "image"=>"images/printer_l.png",
                                                    "table_layout"=>"horizontal",
                                                    "fields"=>array("10"=>array("name"=>"other_description", "head"=>__("Description"),),
                                                                    "20"=>array("name"=>"other_p_port_name", "head"=>__("Port"),),
                                                                   ),
                                                    ),
                                   "usb"=>array(
                                                    "headline"=>__("USB"),
                                                    "sql"=>"SELECT * FROM usb WHERE usb_uuid = '" . $_GET["pc"] . "' AND usb_timestamp = '".$GLOBAL["system_timestamp"]."' AND usb_manufacturer <> '(Standard system devices)' AND usb_caption <> 'HID-compliant consumer control device' AND usb_manufacturer <> '(Standard USB Host Controller)' ORDER BY usb_caption",
                                                    "image"=>"images/usb_l.png",
                                                    "table_layout"=>"horizontal",
                                                    "fields"=>array("10"=>array("name"=>"usb_caption", "head"=>__("Name"),),
                                                                    "20"=>array("name"=>"usb_description", "head"=>__("Description"),),
                                                                    "30"=>array("name"=>"usb_manufacturer", "head"=>__("Manufacturer"),),
                                                                   ),
                                                    ),
                                ),
                  );
/*
" . $_GET["pc"] . "
".$GLOBAL["system_timestamp"]."
*/
?>
